<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>企业展示</title>

    <!-- 引入头文件 -->
    <include file="claim" />

</head>
<body>
<div class="container">
    
<!-- 引入巨幕文件 -->
<include file="jumbotron" />

<!-- 引入导航文件 -->
<include file="nav" />

<!-- 正文开始 -->
<div class="row clearfix">
    
    <!-- 引入左侧边栏 -->
    <include file="aside" />
    
    <div class="col-md-10 column">
        <div class="col-md-12 column">
            <div class="row clearfix">
                <table class="table table-hover">
                    <thead>
                        <tr>
                            <th>
                                序&#160;&#160;&#160;&#160;号
                            </th>
                            <th>
                                栏目名称
                            </th>
                            <th>
                                新闻数量
                            </th>
                            <th>
                                创建时间
                            </th>
                            <th>
                                最后更新
                            </th>
                            <th>
                                操&#160;&#160;&#160;&#160;作
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                    <empty name="list">
                        <tr>
                            <td colspan="6" style="text-align: center;">没有记录！</td>
                        </tr>
                    <else />
                    <foreach name="list" item="l">
                        <tr>
                            <td>
                                {++$tmp}
                            </td>
                            <td>
                                {$l['cat_name']}
                            </td>
                            <td>
                                {$l['news_number']}
                            </td>
                            <td>
                                {$l['cat_addtime']|date="Y/m/d H:i:s", ###}
                            </td>
                            <if condition="$l['cat_updatetime'] eq 0">
                            <td>
                                没有文章记录！
                            </td>
                            <else />
                            <td>
                                {$l['cat_updatetime']|date="Y/m/d H:i:s", ###}
                            </td>
                            </if>
                            <td>
                                <a href="{:U('/admin/company/catedit', array('cat_id'=>$l['cat_id']))}">修改</a> |
                                <!-- 开始遮罩{$l['cat_id']} -->
                                <a href="#" class="text-danger" data-toggle="modal" data-target="#myModal{$l['cat_id']}">删除</a>
                                <!-- 模态框（Modal） -->
                                <div class="modal fade" id="myModal{$l['cat_id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                    <div class="modal-dialog">
                                        <div class="modal-content">
                                            <div class="modal-header">
                                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                                                <h4 class="modal-title" id="myModalLabel">删前确认</h4>
                                            </div>
                                            <div class="modal-body">你确定删除该栏目吗，此操作不可恢复？</div>
                                            <div class="modal-footer">
                                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                                <a type="button" class="btn btn-primary" href="{:U('/admin/company/catdel', array('cat_id'=>$l['cat_id']))}">删除</a>
                                            </div>
                                        </div><!-- /.modal-content -->
                                    </div><!-- /.modal -->
                                </div>
                                <!-- 结束遮罩 -->
                            </td>
                        </tr>
                    </foreach>
                    </empty>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<!-- 正文结束 -->

<!-- 引入页脚文件 -->
<include file="footer" />

</div>
</body>
    
<!-- 引入尾文件 -->
<include file="js" />

<!-- 页面独有脚本 -->
<script>
    // 检索侧边栏点击状态并更改为当前页
    $('li:contains(栏目列表)')[0].className = 'active';
</script>

</html>